import request from "@/request/index";
import { useCache } from "element-plus/es/components/virtual-list/src/hooks/use-cache.mjs";

// 数字资产模块
// 核心业务
export function GETnumberCoreDusinesses(params) {
  return request({
    url: "/zjjscApi/digitalAssets/getNumberCoreDusinesses",
    params,
  });
}
export function GETdataResourceCount(params) {
  return request({
    url: "/zjjscApi/api/fulllifecircle/dataResourceCount",
    params,
  });
}
// 指标数
export function GETindicatorType(params) {
  return request({
    url: "/zjjscApi/digitalAssets/getIndicatorType",
    params,
  });
}

// 动态性指标数
export function GETDigitalAssetsDdtxzbCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/dtxzbCount",
    params,
  });
}


// 可分级指标数
export function GETindicatorTypePercentage(params) {
  return request({
    url: "/zjjscApi/digitalAssets/getIndicatorTypePercentage",
    params,
  });
}
// 可评价指标数
export function GETgetIndicatorIsEvaluable(params) {
  return request({
    url: "/zjjscApi/digitalAssets/getIndicatorIsEvaluable",
    params,
  });
}
//业务事项数量
export function GETBusinessMatter(params) {
  return request({
    url: "/zjjscApi/digitalAssets/getBusinessMatter",
    params,
  });
}
//业务事项数字化率
export function GETBusinessMatterPercentage(params) {
  return request({
    url: "/zjjscApi/digitalAssets/getBusinessMatterPercentage",
    params,
  });
}
//物联感知资源数
export function GETcountUniqueDeviceCode(params) {
  return request({
    url: "/zjjscApi/digitalAssets/countUniqueDeviceCode",
    params,
  });
}
//可分类指标数
export function GETcountIndicatorType(params) {
  return request({
    url: "/zjjscApi/digitalAssets/countIndicatorType",
    params,
  });
}
//可预警指标数
export function GETcountIndicatorTypeWarning(params) {
  return request({
    url: "/zjjscApi/digitalAssets/countIndicatorTypeWarning",
    params,
  });
}
//可回溯指标数
export function GETcountIndicatorTypeRetrospective(params) {
  return request({
    url: "/zjjscApi/digitalAssets/countIndicatorTypeRetrospective",
    params,
  });
}

/**
 * 基础库-数据项数
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsJcksjxCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jcksjxCount",
    params,
  });
}

/**
 * 基础库-数据条数
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsJcksjtCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jcksjtCount",
    params,
  });
}

/**
 *  基础库-表数量
 */ 
export function GETdigitalAssetsJckbCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jckbCount",
    params,
  });
}

/**
 * 专题库-数据条数
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsZtksjtCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/ztksjtCount",
    params,
  });
}

/**
 * 专题库-勘察设计库-数据项数
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsZtkkcsjksjxCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/ztkkcsjksjxCount",
    params,
  });
}

/**
 * 专题库-勘察设计库-数据条数
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsZtkkcsjksjtCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/ztkkcsjksjtCount",
    params,
  });
}

/**
 * 专题库-勘察设计库-表数量
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsZtkkcsjkbCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/ztkkcsjkbCount",
    params,
  });
}

/**
 * 专题库-更多-数据项数
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsZtkgdsjxCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/ztkgdsjxCount",
    params,
  });
}

/**
 * 专题库-更多-数据条数
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsZtkgdsjtCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/ztkgdsjtCount",
    params,
  });
}

/**
 * 专题库-更多-表数量
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsZtkgdbCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/ztkgdbCount",
    params,
  });
}

/**
 * 专题库-工程质量安全库-数据项数
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsZtkgczlaqksjxCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/ztkgczlaqksjxCount",
    params,
  });
}

/**
 * 专题库-工程质量安全库-数据条数
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsZtkgczlaqksjtCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/ztkgczlaqksjtCount",
    params,
  });
}

/**
 * 专题库-工程质量安全库-表数量
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsZtkgczlaqkbCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/ztkgczlaqkbCount",
    params,
  });
}

/**
 * 专题库-表数量
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsZtkbCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/ztkbCount",
    params,
  });
}

/**
 * 专题库-数据项数
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsZtksjxCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/ztksjxCount",
    params,
  });
}

/**
 * 基础库-项目库-在建建筑单体数 tip:无台账中对应数据源
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsJckxmkzjxmdtCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jckxmkzjxmdtCount",
    params,
  });
}

/**
 * 基础库-项目库-在建项目数 tip:无台账中对应数据源
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsJckxmkzjxmCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jckxmkzjxmCount",
    params,
  });
}

/**
 * 基础库-项目库-项目总数 tip:无台账中对应数据源
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsJckxmkxmzCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jckxmkxmzCount",
    params,
  });
}

/**
 * 基础库-项目库-各阶段项目数 tip:无台账中对应数据源
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsJckxmkgjdxmCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jckxmkgjdxmCount",
    params,
  });
}


/**
 * 基础库-企业库-企业资质数 tip:该数据库中没有台账中的表
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsJckqykqyzzCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jckqykqyzzCount",
    params,
  });
}

/**
 * 基础库-企业库-企业类别数 tip:上线时，sql需修改，数据库etl_dwn修改为etl_dwm
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsJckqykqylbCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jckqykqylbCount",
    params,
  });
}

/**
 * 基础库-企业库-企业数 tip:上线时，sql需修改，表名etl_dwn.dwm_jck_qyjbxx修改为etl_dwm.dwm_jck_qyjbxx
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsJckqykqyCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jckqykqyCount",
    params,
  });
}

/**
 * 基础库-人员库-注册人员数
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsJckrykzcryCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jckrykzcryCount",
    params,
  });
}

/**
 * 基础库-人员库-人员类别数 tip:该数据库中没有台账中的表
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsJckrykrylbCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jckrykrylbCount",
    params,
  });
}

/**
 * 基础库-人员库-人员数 tip:该数据库中没有台账中的表
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsJckrykryCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jckrykryCount",
    params,
  });
}

/**
 * 基础库-房屋库-房屋类别
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsJckfwkfwlbCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jckfwkfwlbCount",
    params,
  });
}

/**
 * 基础库-房屋库-房屋栋数
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsJckfwkfwdCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/jckfwkfwdCount",
    params,
  });
}

/**
 * 一级业务数
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsFirstBusinessCount(params) {
  return request({
    url: "/zjjscApi/dataTable/firstBusinessCount",
    params,
  });
}

/**
 * 二级业务数
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsSecondBusinessCount(params) {
  return request({
    url: "/zjjscApi/digitalAssets/secondBusinessCount",
    params,
  });
}

/**
 * 饼图数据
 * @param {*} params 
 * @returns 
 */
export function GETdigitalAssetsBusinessCountTwo(params) {
  return request({
    url: "/zjjscApi/digitalAssets/businessCountTwo",
    params,
  });
}

/**
 * 柱状图数据 - 已数字化业务事项数-二级汇总
 * @param {*} params 
 * @returns 
 */
export function GETdigitizedBusinessCountTwo(params) {
  return request({
    url: "/zjjscApi/digitalAssets/digitizedBusinessCountTwo",
    params,
  });
}

/**
 * 柱状图数据 - 未数字化业务事项数-二级汇总
 * @param {*} params 
 * @returns 
 */
export function GETdigitizedBunDgitizedBusinessCountTwo(params) {
  return request({
    url: "/zjjscApi/digitalAssets/unDgitizedBusinessCountTwo",
    params,
  });
}

/**
 * 组件消费情况
 * @param {*} params 
 * @returns 
 */
export function GETdigitizedNlzjxfxtCountTwo(params) {
  return request({
    url: "/zjjscApi/digitalAssets/nlzjxfxtCountTwo",
    params,
  });
}

/**
 * 结构化数据存储量
 * @returns 
 */
export function getStructuredDataStorage(params) {
  return request({
    url: "/zjjscApi/api/fulllifecircle/structuredDataStorage",
    params
  })
}

/**
 * 获取指标数明细
 * @returns 
 */
export function getzZbCountMx(params) {
  return request({
    useCache: true,
    url: "/zjjscApi/digitalAssets/zbCountMx",
    params
  })
}

/**
 * 获取企业数明细
 * @returns 
 */
export function getJckqykqyCountMx(params) {
  return request({
    useCache: true,
    url: "/zjjscApi/digitalAssets/jckqykqyCountMx",
    params
  })
}

export function getCountUniqueDeviceCodeMx(params) {
  return request({
    useCache: true,
    url: "/zjjscApi/digitalAssets/countUniqueDeviceCodeMx",
    params
  })
}

export function getSpgzzyCountMx(params) {
  return request({
    useCache: true,
    url: "/zjjscApi/digitalAssets/spgzzyCountMx",
    params
  })
}

export function getTablesCountxxMx(params) {
  return request({
    useCache: true,
    url: "/zjjscApi/api/fulllifecircle/tablesCountxxMx",
    params
  })
}